@extends('default.mobile.layouts.indexPublic')
@section('title','个人注册')
{{--首页css--}}
@section('headcss')
    @parent
    <link rel="stylesheet" href="{{asset('/default/css/mobile/index/register_login.css')}}">
    @endsection
    {{--头部标签--}}
    @section('tag','个人注册')

    {{--主体内容--}}
    @section('content')
        <div class="main">
            <ul class="menu">
                <li class="on">手机注册</li>
                <li>邮箱注册</li>
            </ul>
            {{--邮箱注册--}}
            <div class="register_login email" style="display: none" >
                <form action="{{url('mobile/personal/register')}}" onsubmit="return checkEmailReg('#emailForm')" method="post" name="emailForm" id="emailForm">
                    {{csrf_field()}}
                    <input type="hidden" name="unionid" id="unionid" value="{{ session('unionid') }}">
                    <input type="hidden" name="openid" id="openid" value="{{ session('openid')}}">
                    <input type="hidden" name="category" id="category" value="{{session('category') }}">

                    <ul class="content">
                        <li><i class="icon_rl06"></i><input type="text" name="username" id="username" autocomplete="off" placeholder="请输入用户名"></li>
                        <li><i class="icon_rl03"></i><input type="text" name="email" id="email" autocomplete="off" placeholder="请输入邮箱"></li>
                        <li><i class="icon_rl07"></i><input type="password" name="password" id="password" autocomplete="off" placeholder="请输入密码"></li>
                        <li><i class="icon_rl07"></i><input type="password" name="password_confirmation" id="password_confirmation" autocomplete="off" placeholder="请确认密码"></li>
                        <li>
                            <i class="icon_rl08"></i>
                            <input type="text" name="code" id="code" placeholder="请输入验证码" autocomplete="off" class="inp02" style="float:left;">
                            <div class="verification">
                                <span class="getcode"><img  id="getcode" src="{{captcha_src()}}" alt="" onclick="this.src='{{captcha_src()}}' + Math.random()"></span>
                            </div>
                            <div class="change">
                                <span class="another"><a  onclick="document.getElementById('getcode').src='{{captcha_src()}}' + Math.random()">换一张</a></span>
                            </div>
                        </li>
                    </ul>
                    <div class="forget">
                    <span>
                        <input name="remember" type="checkbox" class="agree" id="remember"  checked>
                        <label for="remember">同意注册协议</label>
                    </span>
                    </div>
                    <div class="sub"><input type="submit" value="立即注册"></div>
                    <div class="noPerson"><p>已有账号? <a href="{{url('mobile/personal/login')}}">马上登录</a></p></div>
                </form>
            </div>

            {{--手机注册--}}
            <div class="register_login mobile" >
                <form action="{{url('mobile/personal/register')}}" onsubmit="return checkMobileReg('#mobileForm')" method="post" name="mobileForm" id="mobileForm">
                    {{csrf_field()}}
                    <input type="hidden" name="unionid" id="unionid" value="{{ session('unionid') }}">
                    <input type="hidden" name="openid" id="openid" value="{{ session('openid')}}">
                    <input type="hidden" name="category" id="category" value="{{session('category') }}">
                    <ul class="content" style="display:block">
                        <li><i class="icon_rl05"></i><input name="mobile"  id="mobile" type="text" autocomplete="off"  placeholder="请输入手机号码"></li>
                        <li><i class="icon_rl08"></i><input name="mobCode" id="mobCode" type="text" placeholder="请输入验证码" autocomplete="off"  class="inp02">
                            <input name="mobcode" id="mobcode" type="button" onclick="getModCode($(this),$('#mobile'))" class="code" value="获取验证码">
                        <li><i class="icon_rl07"></i><input name="password" id="password" type="password" autocomplete="off" placeholder="请输入密码"></li>
                        <li><i class="icon_rl07"></i><input name="password_confirmation" id="password_confirmation" type="password" autocomplete="off" placeholder="请确认密码"></li>
                    </ul>
                    <div class="forget">
                    <span>
                        <input name="mobAgree" type="checkbox" class="agree" id="mobAgree" checked>
                        <label for="mobAgree">同意注册协议</label>
                    </span>
                    </div>
                    <div class="sub"><input type="submit" value="立即注册"></div>
                    <div class="noPerson"><p>已有账号? <a href="{{url('mobile/personal/login')}}">马上登录</a></p></div>
                </form>
            </div>
            {{--尾部--}}
            @include('default.mobile.layouts.footer')
        </div>
@endsection

@section('footerjs')
    @parent
    <script>
        var _token = "{{csrf_token()}}";
        var mobCodeUrl = "{{ url('personal/ajax_mob_code') }}";
        var imgCode = "{{captcha_src('code')}}" + Math.random();
    </script>
    <script type="text/javascript" src="{{asset('/default/js/mobile/personal/register.js')}}"></script>
@endsection